{# Emit the controls (save button etc.) for a pieces edit or create modal #}
{% import 'apostrophe-ui:components/dropdowns.html' as dropdowns with context -%}
{% import 'apostrophe-ui:components/buttons.html' as buttons with context -%}

{% for control in data.controls %}
  {% if control.uploadable %}
    <input type="file" multiple name="files" style="display:none" data-apos-uploader-{{ data.options.name }} />
  {% endif %}
  {% if control.type == 'dropdown' %}
    {{ dropdowns.base(control, control.dropdownType or 'button', control.dropdownOptions or {}) }}
  {% elif control.type == 'minor' %}
    {{ buttons.minor(control.label, control) }}
  {% elif control.type == 'major' %}
    {{ buttons.major(control.label, control) }}
  {% endif %}
{% endfor %}
